#pragma once

#include <logicwork.h>
#include <vector>
#include <mutex>
#include <thread>

class LogicSystem
{
public:
	static LogicSystem& getInstance();
	void init();

	int getThreadCnt() { 
		return threadCnt_; 
	}

	bool postTask(std::shared_ptr<LogicNode> logicNode);
	~LogicSystem();
private:
	LogicSystem();

private:
	std::mutex workLock_;
	std::vector<std::shared_ptr<LogicWork>> logicWorks_;
	int threadCnt_;
};
